Fixed typos and added debug notifications for testing.