Moved stuff off to a seperate library

I moved most of the code over to a library. The library AGSAT now allows
the satisfiability solving of expressions.