[Console] Autocomplete cleanups/optimisations

I know the optimisations to this code are getting kinda ridiculous, but I found a few more things to tidy up.