Move some stuff out to rust-ansi-term crate