small fixes and a bunch of tests

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: fix treeisation of if-statements

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: fix treeisation of let-statements

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