minor changes and refactorings.
small renaming stuff
some small naming changes + code commenting