Refactoring plugin into two plugins: core and ui