postgres dump from the demo
slight refactoring to js
start of moving ui to angular