Unrolling some loops to try and gain speed.

I have not compiled with this yet, so use at your own risk!
Also replaced byte shifts with their final values, too.