Added the license information and tidied up