Some documentation / small refactoring