enable more warnings

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

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix a bunch or warnings

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

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