Add refs and atoms