[PATCH] Cleanups and 'td' size reduction