Add factory for machines of various models, plus tests. M1-4 series supported so far.