refactoring intents call in TupMainWindow, and fix bugs in metatags.