Generalized matrix size; improved clearing elements

Now the user may choose the size of the matrix--also implemented classes
and a jQuery selector that makes sure all previous information is
cleared from the screen when the user clicks the "Create Matrix" button.