factor.rs: move factor() to the top.