Cleaned up tr rules; various other edits.