Initial checkin. Mostly working.