use curry2 to remove boilerplate
Merge pull request #284 from davidchambers/curry2

use curry2 to remove boilerplate
trim trailing whitespace