Remove unnecessary state and writer monad instances