Refactoring build for scalsjs

First cut