Various cleanups and UI fixes