Make javascript extendable and refactor success handler: new release