Refactor plug-in functions
Refactor some debug statements