Tidied up tab completion scripts