23/11/13 16.28

All matrices changed so functions are stored in rows not columns.
Initial work of generating E and G matrices.