Added some comments and logging