Finished implementation of chapter 3 (memories)