Added license and fixed things