a bunch of JS from Kai
Merge branch 'master' of github.com:httpsters/nxt-repair