cleanup: codingguidelines and little bugfixes