refactorized Frame class