Changed to use a more efficient method for selecting next multiplier, did a bunch of code cleanup - mostly just formatting.