minor bugfixes, codestyle and header organization
header reorganization and renaming