add maybe monad, monad class, minor refinements

Signed-off-by: Andrew Pelimsky <a@0x41.co>