Fixed overal code complexity in controllers