Made some more optimizations