Added getHistory support. Data is sent to client. Minor tweaks and
bugfixes.