Cleaned up misleading context and removed debug code