Optimisation of units conversions.

Here is a pull request with my work so far. Feel free to comment.