Cleaned up some async code by creating sync wrapper functions.