Cleanup
Compatibility fix
Added debug options in makefile
Lattice fixes
Fixed example