Fix bugs, add init javascript files.