Refactor frame support and enable in screen and codeblock #1231