5.2 merge

Unit and integration tests pass.