Added licence, small fixes