Several new frame functions

"Set" functions, and a function to get a frame's function.  Also some minor bug fixes.