Rebased from current master

@intellix I've attempted to merge this against current master. However, I've got an issue arising -- Angular reports it cannot find a provider for the Hal service (something I created in current master, and on which a number of services such as the ApiRepository depend) - and this makes the whole thing break.

My inclination is to revert the usage of ng-min, as I know I can get it to work that way. However, using ng-min also very much simplifies the code.

Can you take a look at this PR and see if you can figure it out?