Multiple changes

- Fixed some problems in vect shuffle and math matrix.
- Added matrix_elements.
Multiple changes

- Refactored the math elements function.