refactor scripts for AMD
correct server init