Minor changes and debug statements