Smallfixes, refactoring.