Updated unit tests.
- also moved calculation of rounding factor to outside the conversion function