Some code optimizations
Some code optimizations