Added string trimming, CREATE TABLE IF NOT EXISTS sql statements