Flow improvements, automatic parameter selection, general code cleanup, results checking