simplified atom references and fixed #55