Remove commented-out code
Extract tryCatchResolve