code cleanup and config updates