Update from H5Bp
apiUrl added
small refactoring