linting findOpeningBracket and improving readability