updated build, added python example files
refinements to build
fixing some memory leaks