mode cleanups