some crazy hacks added to make table complex tables look nice
junk removed