One-liner with all conditions.
Added BEAM files.