Backend updates

Now able to add categories. Fixed a bunch of bugs in the system.