Rewrote the table function to be able to hide columns on mobile devices