tidying up Quaternion and making the model loader more robust against spurious newlines.