change minor bugs in factory (id were calculated for each factory), and ...

...add system draft