Code cleanups and settings changes