trivial cleanups
clean up code thanks to monad transformers and EitherT
shorter yet