Rename some files to get around silly bug. Also, move some code from QML to C++ where it makes sense.