REFACTOR: Major refactoring work + simplier build