Updated to support non-static calls.