Adding flags, start of monad base, added monad helpers