Added new target sorting, and target class for handling targets.