added post history importer; small bug fixes; update sql script.