Initial code check-in. Likely to be missing some pieces.