Simplified commonly used code.