Replace component wise operations, remove duplicated multiplication
Unify copy-paste
Indentation
Cleanup, use proper types
Rename variables
Unify copy-paste
Code style
Code style
Code style
Indentation
Indentation
Indentation
Cleanup
Cleanup
Cleanup
Unify copy-paste
Unify copy-paste
Unify copy-paste
Use copy-paste
Use copy-paste