added testcode + viewmatrix + fixed some buggy things