SAPI: Wrap SAPI functions in a the class SAPI()