Fixed tests and merge conflicts