Miscellaneous cleanup of actions.py.
Miscellaneous cleanup on autoscripts.py.