Reduce max cyclomatic complexity to 13