Elementary code pieces that are useful in many places.