Completed refactoring on contacts controller