Code cleanup + some more commands for webviews