Separate frame code