Reduce cyclomatic complexity
Removing superfluous conditions
Removing switch statement in favour of dedicated methods