Some optimizations applied