Reorganized loader script