refactor frame to take a hash of options for frame