Move main plugin class into its own file.