Refactoring to implement dynamic columns. Need code review =). I'm tired now, I need beer. \o/ Sorry my ugly code.