fix name typos
prefer pattern match over exceptions
small style changes

prefer >>| to >>= and return
Merge pull request #122 from rgrinberg/master

style changes + typo