fix #410 arena runs + make API testable (unit tests)