Cleaned up code. Use static library instead of shared library.
Added iterative methods for combinatorial search.