removed legend support and about to refactor into separat files
partial refactoring complete - bulds
further partial refactoring complete - needs work on rendertomem cp file.
commit before trying lzz
working somewhat