First commit of code copied over from Poe's brollyflock repo