Removed and replaced debug statements