Move away from AMD and bower.

This allows the removal of a couple of frontend dependencies, with the remaining installable via npm.

Other enhancements include:

 - Refactoring across the board.
 - Much improved README.
 - Better backend logging.