Resize Ace editor when splitter dragged. Refactored code a bit