fixed up some bugs and added more to restTest