Adding an await implementation. Also adding license to flat_map files.