Add rebuild method and clear markers