Added documentation to states, renamed render flags to draw.