Add functional tests and requirements.txt