Cleanups and reimplemented !quit