Error monads!

Still need some cleanup, but in working state