fix a few bugs and implement remaining main features
add tests
add setup.py (incomplete)
pull in better .gitignore