Fix a couple of functions; fix Data load code; start script using functions