Begin refactor to use transaction for DB updates, debug variable issue fr...

...om last commit, change hrefs to ui-sref