Fixed some cyclomatic complexity warnings