Clean up prelude-mode.
Pull in upstream changes