Fixing bugs in server and adding script to load model