Made method RenderMatrix to return string.

Renamed method RenderMatrix to FormatMatrix
Refactored it in Engine class