squashed a few bugs. simplified and began implementation of clauses