Finalised the question rules.

Added extended codes and logic to the questionnaire section to cope with
re-loads and rule executions.