Made optimizations