Code modifications to facilite saving/loading functions.