Moved the polynomial background to 5th order. Varios bug fixes and changes.