refactoring comments controller and add the test