Removed debug/logging part of the code