clean up imports in repl.py
fmtstr update required! cleanup using new api
clean up debug statements
reorganize method order