This class shares much code with the `AutoCompleteController` (probably resulting from a copy/paste).
Why not extending that other class instead? It will make the code much more readable.