Updated for python 3.4. sqlite still broken
Fixed sqlite, updated parts of db.py to py3.4