Restructure plugin

Restructure plugin to be compatible with wordpress.