Changed the service instantiation code.