Updated Frame.js and FrameSpec.js files and refactored code