attempts to fix the code for deployment

I fixed a few problems in the deployment.  I think there are still problems though.