Fixed boneheaded crashes
Added setup script