Memory leakage removal. Update documentation. Updated makefile