Rewrite to better qml.