Small bug fixes & stylistic changes

fixed an issue where callback could be invoked multiple times. Now
passing errors in a more node-like fashion