Partial work on CSE integration

Needs to expand further - functional, but ugly.