Refactored plugin structure.

Changed plugin structure for better organization.