Refactored ServiceFactory to allow third programs (website) to connect to the backend