merging and small fixes