cleaned up files to be pep8 friendly. removed extra funcs not in use. figured out app_context issue, i think...