refactored comments_controller to reduce complexity