Added some user tests and fixed a couple of bugs