posse-post-discovery: refactoring and cleanup