Some short snippets of code that might come in handy later