Still working on untwisting some of this from the code base I built it for, had to rewrite some large chunks in the process, see README for how to get it working as is.