Modified cleanSelect function

Changed for use in multiple elements