'run_addon()' now works. Also did some code cleanup.