[WIP] Feature/cleanup 3

Refactoring/tweeks continued.