More refactoring

Big changes coming to engine in the next few commits. its going to be
legen - wait for it.