Added functionality for selecting units and basic collision detection