Reordering to place code above rendering