added lots of commits, including matrix manipulation for graphics