Patch by Thomas Preece

Updates to Quoting Style,
Separation of Tables,
Update of MySQL Indexes.