Fix comments and assertion messages
Reserve space for lits_ in constructor
Rewrite some code to make it easier to understand