Detect simple cases and add less code