Cleaned up and added a little Table logic