Debugged many things. Redid how query portion uses logging. Included the sanitize utility function. Mysql portion is now working, but potentially buggy.