Abstract the part that controls the 'Locked' and 'Back Moves' buttons from the two activities: the main one and the tutorial one.This code had been duplicated there.
Cube Control: step 2.
Rename 'state' to 'screen'