Imported from gDrive

Currently includes comments inline. These should go elsewhere at some point.