Fixed bugs and refactored Consent to Act controller - working subroutine 'check'.