Lots of backend fixes

Decided not to rewrite in the end
Merge pull request #32 from asmockler/rewrite_admin

Lots of backend fixes