Security Fixes and Functionality Fix

Put in a database security fix to use the correct string encoding and fixed the base functionality of the extension so that it actually works.