Fixes For DB_BASIC + Sanitize Input to DB

Also minor fixes for includes