Made Domain object serializable and referenced an implementation of interface in the factory class.