Added some frame codes.
Added tests code.