Remove unused functions
Fix extra semicolon
Drop extra sqlite3 return codes not supported in 3.7
Standards and fix ifdef to ifndef