Refactored code in scripts and added data peristence feature.  Need to clean up and add functionality to show buttons with visits already loaded