Various code pieces that didn't quite congeal