Inserted simple messages in various places to see the flow of the code.