Refactored some of the code and working on updating the plugin