Added Listener pattern to algorithm

Will be used for the web interface communication of the coordinates