Added parsing state update function
Using gnu indent for styling