Some improvements in the application

* Finished sorting process and testing