Big load of changes (warning: untested with old engines)