Miscellaneous code from various platforms