added: functions to  object for compartmentalization; changed: init(), api() function declaration