Struct cleanup, tool writer fixed