Refactor bar repositioning