Resize: restructure temp. frame allocation code as per suggestion on irc.