refactored handlers and converted all datastore calls to async where possible