refactor, add comments, and fix listen callback
add readme