Refactor tests.py and add nose for running tests
Delete tests.py