Fixed two bugs: Map not being stored correctly in the shared prefs by GSON and a bug due to excessive copy-paste

Still need to limit history size and allow user to clear it.