Changed unit.py to use the toPixel function from common.py