[api] make functions private to mitigate possibility of overriding
[api] also allow optional callback to be accepted in the constructor