Started adding Memory leak checking and map save/restore.