Removed useless variables in Factory