Added license and cleaned some stuff up.