create a 'KMonad' that includes an environment

Huge refactor, now most things are done in a monolithic 'KMonad' that
includes an Env, so all the operations can be done from that.