Fix maven dependencies. Improvements in sorting validation.