clean up matrix.py & square matrices

still need error handling...