remove sqlite3; fix bugs
merge codes