Refactor for blog project