MODIFIED: sql commands

The create commands contain the 'if not exists' clause to make them more robust since an error was caused by an attempt to recreate the table. If the table is already there this will not over write the data and is therefore a simple solution.