complete new build system and refactor