Optimization

Small improvements to code performance, mainly loop unrolling. In
addition, removed extraneous comments and testing print statements.