Load improved

completely rewrote the script to load data into the datebase