cleanup, better ordering to take advantage of async calls