Added write support for entities.
Added heartbeats to ExportService. Sends one between writing entities every time one takes more than 5 seconds.