README added, code tidied for legibility