Miscellaneous code from various projects