Add LastAutoIncrement variable to sqlite
Fix Object placeholder and clean up code a bit