used next for callbacks, fixed comments
better comments
there is no Integer in JS
Dead code