Remove some unused code and use same catch for multiple exceptions
add explicit test for referring steps