optimized associative array check
callback function refactoring
added sqlite3_exec() wrapper
added some abstractions
minor refactoring