Added comments and logs