update logic in sections template part. fix a few styles.