Some debug statements added for more visibility on testing.