Legacy Autoload script improvement