restructuring to make the build more modular