clean up

more clean up. rebuild some bash stuff. Start the move to Python.