add Rakefile to drive build process
fix failing tests
Merge build fixes