Initial cut of the code.