Refactor blog model and helper