Added some compiler optimizations