implement setup.py
add requirements to setup
fix state saving/loading
implement xml parsing models