reworked everything (again)
now looks for var declarations and puts them at the beginning of the problem
fixed some issues
reworked everything (yet again), now is more functional
updated tests and documentation
added eq optimization