Refactor coprocessor implementation into loaded ruby script.

This takes us one step closer to a working integration test.