Finalized test coverage and added ksort to sensor retrieval.