Add licence and minor refactoring to title image plugin.