cleaner way to handle "the " prefix for devices
added function to filter and sort autocomplete entries
removing unused file