Fix rounding issues

still needs a ton of refactoring -  UGLY