Shortened First and Second Order code. Added file for Third Order