Less pain

This takes the changes master mkelly made in pull #105 and addresses many of the nits professor peterbe made.

I broke each nit out into its own commit for the purposes of easier reviewing. Hope that helps rather than hinders.

r?