Added skeleton code for viewer.
Improve matrix.
Todo.