Tidied code selecting best individuals