Fixes for includes; related to attributes

Added better debugging to SQLite; debug: true will now print the SQL of a query to the console