moving left() and right() helpers from core to frame and adding tests