Merged control and menu condition code

The code has been merged, but transference is not fully functioning. Some cleanup is still required.
Why are we hashing here? Can we add some block comments to these functions do describe what they do?