Move PartFactory into separate file

Ignore .StyleCop