Reduce code complexity levels