Merged code with Haggard's updates, added readme.