reduce code complexity

Signed-off-by: Mattias Andrée <maandree@operamail.com>
style + reduce code complexity

Signed-off-by: Mattias Andrée <maandree@operamail.com>
reduce code complexity

Signed-off-by: Mattias Andrée <maandree@operamail.com>
m

Signed-off-by: Mattias Andrée <maandree@operamail.com>
reduce code complexity

Signed-off-by: Mattias Andrée <maandree@operamail.com>
m

Signed-off-by: Mattias Andrée <maandree@operamail.com>