Adds code for showing subelements