Lots of changes to add insert posts and fix the get posts
new InsertPost code