Add Huzman's optimizations