Pulled in changes from WeeklyChallenges master fork.