style changes.
moved stuff around again.
moved stuff around again.
moved stuff around again.
aggrgate costs added.
moved stuff around again.
fixed some ugly hacks.