Add classes to represent different units and modify the code to use them.
Add classes to represent different units and modify the code to use them.