order cleanup and script correction