Assignment 2 updates to cachematrix.R