merged last batch of changes to ts3 plugin.