Miscellaneous code that might be useful to others for learning/demonstration purposes.