Miscelaneous snippits of code