complete refactoring (#12, #13, #14) now with services, closes #12, closes #13, closes #14