Small code snippets (miscellaneous)