plugging some memory leaks, plus cleanup
added licenses
got dc level shift working