Added tests and fixed pre-deploy.