Refactor blog app