Fixes autofill plugin and splits methods to reduce complexity