Fix a few bugs in deployment, update requirements