Moved Posts construction back to generated code... but simplified and added 'add' method to Posts object.