Separated monad and datatype definitions from rest of code