Sort refactor

This is gonna be 2.0 ;)