Added license / etc. to plugin, renamed files and cleaned dead code