Remove panics to allow for visitor to return error.
Add DEBUG variable to visitor, allowing for debugging information to be printed.