Code review and enhancements