Some proposed refactorings :)