Extract element initialization (content and attributes) into private methods