refactor code, also add a unified selection index interface for training and selection populations (list based and from database)