Removed Factory implementation from MainClass