inf-103 refactoring

this is ready to be merged!