Style cleanups, fix minimum quantity searching
More scala style improvements - this is now old code