Tried some more small optimizations