Cleanups and rearangments