Added charting, basic functions, set up the matrix/arrays