Add comments and fixes