implement GetRenderState, fixed some formatting nits