Refactor plugin code

Code was refactored and plugin was added to Wordpress plugin page