Refactored
Refactored to_unicode()
Dealing with missing chardet
Refactored db interface