STF471: source formatting (step1)
* sizeof() -> lengthof() * template restrictions added for template parameters where possible