various autocomplete changes and prettified code