Added some optimizations. Didn't really help.