Initial checkin. Not perfect, but it works.