localize several variables, and simplify the last part of park_exec()