Start converting master.c into a series of unit tests