Results of preliminary testing. Mostly manual control for now. See code
for details