Changed handleComment to be FSA with states.

Changed the handleComment method to work like an FSA with different
states. This seems to work better anyway.