1. Refactor the multi column selection algorithm
2. code cleanup