IFC4 stuff and small bug fixes