Added REST resources, fixed testclass and removed unused code.