Put the actual parsing logic at the top of createSourceFile instead of the bottom.

This makes it vastly simpler to fix up that logic since you no longer have to go find
the end of the function first.
Remove unused type.
Merge pull request #1412 from Microsoft/parserOrganization

Put the actual parsing logic at the top of createSourceFile instead of the bottom.