Adding ability to change units

 - also fixing bug where invalid units could be passed