make callbacks follow node convention, add comments