Miscellaneous code snippets.