Refactored trames to frames