Bits and bobs. It's kinda late.
Merged the stuff I wrote on github