Modified the README and tidied up the source code