1. Fixed wrong start state error
2. minor clean up
3. fixed statespace bounds