Some first attempts at pattern matching.