Factor out atoms