Rewriting autofill code completely