Adding service layer to support rest.