Revert "replace Matrix Computations with Accelerate and LAPACK code"

This reverts commit 8ca1df8af9cac91e53d1208a24cee71ccacbf571.
Fixed a bug in click handling