Cleaned up the table and added a render function