Reworked the build system