robustness improvements and fights with memory leaks
cleaning up examples