Remove trailing periods if they are unused.

If you hit 1." it will get rid of the . (The calculations were still
working fine, it just looks better this way)