Move to floats for most things to resolve scaling issues.
Change floor(x+0.5) to round(x) for slider snap.