Code and license added, readme updated.