Added callbacks for updating and rendering
Some refactoring + passing WindowContext to user-defined wndProc callback