#1909| Cleaning up visit.js again
#1909| refactoring around results