Added tests and fixed setup.py