refactors some todos