Finished quaternion refactoring

Documentation still unfinished