Initial pass at a basic implementation.