Added ability to load local data and streamlined the variable naming to reduce redundancy