Added basic history tracking.  Also, chunked the API stuff.
Improved history tracking