everything up to the difficult merge

Everything up to the difficult merge, plus the RachelBryk commit after.