Programmatically a create content form
I agree with Clive, that this seems like a great deal of trouble, but what you should be doing generally, is calling field_attach_form(), and more specifically for nodes, node_form(), which calls the former. The arguments it expects are

You can see an example on the first here: Is displaying a working Field Widget Form on its own possible?