Added REDAME, License and tidied up code