Rearranged to reflect proper DOM