update markup, move classes to element from containing div