Fix Cyclomatic Complexity