Fix bugs, move old js files