Dave Armstrong's Miscellaneous Functions