Added sort feature, reorganized GUI