Major refactoring. Changed the entire plugin engine into C functions instead of using inheritance.

Used the principle of Common Object Model developed and maintained by
Microsoft as base for this plugin system.