Typo's and some logging refactored to debug statements