Added a method to clear units.