hodgepodge collection of code I still have around and think is useful