Fixed bug with Matrix class. Due to the way resize is implemented in std::vector, the initialization would not necessarily set every value to the desired value. Now we clear the old array before resizing.