refactor components and plugins