New palette function.
Something went wrong.
Some changes.
Updates for 040113.