Minor Modifications and Optimizations