Refactored factories and implemented new factories