Fixed a NPE in the ReduxAPI. Fixed multiple bugs around the loading and executing of the javascript files. (commit: bcdea6a)