Committing week 4 refactoring code.