Merge pull request #37 from niode/new

Improved heuristics.
Improved
Added Makefile, improved heuristics, added memory tracking.