WIP: refactoring build process