Code cleanup and revert incorrect settings.