Fixed up the manifest permissions and added some logic for running delegate methods on the ui thread.