new file - handles querying tern, and sending results back to the main thread.