add more doc strings and comments
fix some stupid bugs in main lineage.py module