Refactor GoToError class.