Initial commit

Script handles both archival and control. It is really bad design, as these roles should be separated in different scripts (and eventually could run on different nodes). But Pi has only so much RAM.