Updated to Qt5, added load/save state and borders.