improve JSDoc, some refactoring
fix tests descriptions
getJsonp: don't leak to global scope before the first call, reject promise instead of throwing an exception
fix some build issues