refactors erb files