Added some simple tests. Started work on multiple devices in a chain. Nothing is broken yet, but some stuff is verbose.