complete map structure

Signed-off-by: Mattias Andrée <maandree@operamail.com>
move includes into new .h file

Signed-off-by: Mattias Andrée <maandree@operamail.com>
move structs into .h file

Signed-off-by: Mattias Andrée <maandree@operamail.com>
move non-static variables into .h file

Signed-off-by: Mattias Andrée <maandree@operamail.com>
m + add non-static prototypes to .h file

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