Cleaned up database and code.  Removed all csv code and reworked it to use only a mysql database.
Added addslashes to the write code.
Updated .gitignore.