* cleaned up the header render code a bit