Miscellaneous code snippets and config