move config into a separate class, make functions easier to use from ipython
give more arguments defaults
fix bug: go back to using get_input
refactor, move database code into Database class