made synchronous calls use async stuff; cleaned a lot of things