Remove some unnecessary state variables by using Promise.all() instead.