Added license with some small fixes