Moved tests to data field
Added sort to tests
Added codes to tests