Refactoring done on autocomplete and textboxes