Refactor of the code to remove the verbose / debug variable (replaced with Logging library)