Added license notice and fixed EAP handling