You can identify the various pieces of the sample code by keeping the following conventions in mind.
RMAPIunctions begin with scha_.
DSDL functions begin with scds_.
Callback methods begin with xfnts_.
User-written functions begin with svc_.