Bug fixing
The swap temp color
Be more careful to the scope of the variables
When the variable are out of range thing two things
1) Do I need to role back to it's initial state
2) Should I keep the state in the following procedure

This is why the information hiding and keep the lowest info exposure!