Add optional node-style callback.
Move code to src/ directory.