Parts done

All the major components needed to move onto Alpha have been defined.
Comments to the code have been added.