Factory pattern restruct like we agreed

as the title says,
you can be proud, i done it on different branch.

if this pull will be excepted, we can continue easily from here