Re #9782. Renamed function, some cleaning up.
Re #9782. Added Simple test algorithm to demonstrate functionality.

Test data is required, can be found attached to ticket.