Add unit tests, update doc's, make shared RequireJS configuration.