Add build script, refactor setup.py