Refactor Court of Session parser; add logging support for debugging