main social rail

main social rail works (but no edge case handling yet)
-- also added in dummy text to writeout as a guide for php.