Further refactoring and exposing in the UI several ways to tweak the algorthm