Small optimizations

Take a look and ask me about any of it!