Use Singleton class for the DB helper. Fix some bugs.