Refs #5842, use correct `ps` syntax
removed unused variables and dead code
RunTimeException vs. RuntimeException
fixed Exception use statements