Remove unused code, add import for catch keyword