Merge pull request #112 from csmith/master

Change optionals.
Simplify some optional logic.