Fixed bug in simplify
Fixed bug in getLiterals