Code cleanup and configuration adjustments