Migrate to autoplugins, and fix issues

Review by @eed3si9n