From http://www.sitepoint.com/refactoring-workout-relentlessly-green/