Code Corrections and Enhancements