Some Build.scala fixes.
Lots of reorganization, updating, tests.