Feature/build cleanup

`Build.scala` had become a ghetto. This PR tries to clean it up + make the build more modular so that things are clearer and easier to manage.