Refactored the koans to use a constructor function.