Adding initial version of lib/frame.js