Fix #957 and #874 by implementing the pane splitter