Fixes "Uncaught Error: SecurityError"

Fixes "Uncaught Error: SecurityError" mentioned in issues as well as resolving some deprecated calls in logging.