Preliminary implementation with driver code.