Some merges and fixes