Converted to a Runsafe Plug-in with many fixes/changes!