removed tablelength function (use #table), cleaned up tipoftheday function