Fix tests for new contextual dependency specification
Problem with Apamman when returning an implemtation to insatntiate
Fix problems with messages in apform and fix tests