cleanups and console stuff