More NULL checks for Rectangle and Vector
Match the Window::render() C++ API
Trait::resetTrait() wasn't being called every time it should have been