move traygen stuff to extra file