Added failing test for error emit
now emitting errors to allow for easier treatment. some cleanup