refectored element and atom classes