Finished adding (but not testing) by-factors support