Initial updates to fix rounding

custom abs() not needed
custom rounding implemented (was truncating before)