Miscellaneous scripts and code bits