Various bits of code for various things