Tidied up commented code
added ability to modify entries as well as add new ones