Rewrote Factory wihtout switch statement
Wrote appropriate copyright commment