A lot of work. More commits later.