Revamped run script. Adds many warnings and some optimizations, and reports on warnings not used.