Made parse async for consistency, tweak error codes.