Added license header and comments