Applied some more small optimizations.