Modified Units class

Merged the second if statement with the first if statement
Created new method to remove last 2 characters which are units