Code and musings by Darshak Parikh