Integration continues, some minor efficiency tweaks

I've grown so much over these past few commits.