Unit handling, with implementations for basic units.