Hcf middleware

Another set of improvements based on feedback. Main change is to add setting to define whether to start new jobs in old or new panel.