Selection sort + better organization