Add Prolog and delete garbage