add setup.py
move core out into a separate module; set up some basic commands