reorganized code, solidified "standard", "bylast", and "twobylast" formats, with testing.