Major bugs found and worked on.

Major reworking of Update function. Not complete
Debug modes added
SQL stripping helper updated