some cleanup in ngtembed
removed oldmain from main.cpp (still work in progress)