Adding headers to api requests, minor bug fixes.