more small refactorings
refactored stuff