correcting trailing t at the end
commenting unnecessary log
changes related to data organisation
add checks when inc/dec current state (not to go bellow 1 or beyond stateCount