refactor code view and ccs