PDF now opened in popup.
Terminal can now talk with API.