Refactor to use resolveFramer and resolveFrame utility functions for better DRY