Extract FrameScanner into its own file