Bits of code that I have found useful