LPS-34428 Re-sending with the changes Brian asked for

...aaand one bugfix :)