Add pivot script, and fixed ordering for other scripts