Refactors code.