Implemented use of factoryclasses in server module.