Reedited main class code for table renderization