Organized and documented the code of TMViewController.