Some code reduce

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

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