Refactor post and draft object creation

De-duplicate object creation between posts and drafts. Inject the name
dependency through a parameter