Sebs august refactorings

refactored some things.