mostly refactored
updated compile
Merge branch 'feature-refactor' into develop