Implement rest methods on the contact controller, refactoring