WIP changes

- quaternions are partially added
- functions definitions are reordered