Refactors entire project, separates core from cli and gui interfaces