moved convert to tw to app plugin and some tidying