Added read/write load/save functions.