Maybe you can put the style and table wrapping inside a function? Just so that it's easier to read. :)