Last semester sample code refactoring.