Dollar all the things

Make BB work with ender or zepto or jQuery - also did some tidying up by removing state-machine and refactoring the initializer