cleanup and adding multiple select support