Clean up and better integration of monads