Refactor of Frame class, working tests