Tidying, bugfixes

Deployment now works.