Unrelated to this pull request, but please clean up std::cout and replace them with LogDebug() statements.