Cleaned up code, started re-working trig page.