LPS-44709, LPS-44347, LPS-44701

Hi Brian,

@JorgeFerrer already reviewed the functional part, @mdelapenya the test part.

Thanks.

/cc @shuyangzhou

UPDATE: I did a force push to update commit messages (change LPS numbers)