tried with some new flags
small cleanups, still bad memory overhead
separation of files, added purge for static structures