add setting page, reorganize template structure