Streamlined and corrected SQL Updater

Fixed a few issues and removed redundancies.