small improvment in atlas tool & code cleanup