WIP: Separate wrapper.rs into some parts.