Refactor code structure, run unit tests using setup.py