Reformat script for load links. Solved some bugs.