many small fixes, emf works now for one example.