merge + several small fixes