Adds comments and fixes waiting process bug