Fixed some bugs and integrated matrices