refactored blog view and controller