diff --git a/bin/account-manager-web.pl b/bin/account-manager-web.pl
index e862c559fbe65d0be6ae966049cfbb5a70a1b6eb..1f695c057aaedfe0fb1ae96073f4886d8d50f8cd 100755
--- a/bin/account-manager-web.pl
+++ b/bin/account-manager-web.pl
@@ -8,38 +8,16 @@ use lib qw(lib);
 use IdPAccountManager::Configuration;
 use IdPAccountManager::WebRequest;
 
-## Defining parameters format
-my $urn_or_url_regex = '(http(s?):\/\/|urn:)[^\\\$\*\"\'\`\^\|\<\>\n\s]+'
-  ;    ## Format de type URL HTTP ou URN
-my $url_regex     = 'http(s?):\/\/[^\\\$\*\"\'\`\^\|\<\>\n\s]+';
-my $email_regex   = '([\w\-\_\.\/\+\=\'\&]+|\".*\")\@[\w\-]+(\.[\w\-]+)+';
-my $domains_regex = '[\w\.\-]+(,[\w\.\-]+)*';
-my %format        = (
-    ## URL
-    #'attributeauthority' => $url_regex,
-    'sp_entityid' => $urn_or_url_regex,
-);
-
 my $configuration = IdPAccountManager::Configuration->new(
     file => 'conf/IdPAccountManager.conf'
 );
 
-my %actions = (
-    'select_sp'      => { 'title_en' => 'Select your Service Provider' },
-    'account_wizard' => { 'title_en' => 'Select your Service Provider' },
-    'generate_token' => { 'title_en' => 'Generate an authentication token' },
-    'validate_token' => { 'title_en' => 'Complete Email Challenge' },
-    'home'           => { 'title_en' => $configuration->{app_name} },
-);
-
 ## Gives writes for the group
 umask 0002;
 
 chdir $configuration->{root_manager_dir};
 
 my $request = new IdPAccountManager::WebRequest(
-    actions       => \%actions,
-    format        => \%format,
     configuration => $configuration
 );
 
diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index 0bdc94b4f56415e1bd8e6e45da318aa8d0261ccf..6cc0c14a4375379761829b1488235558254328d8 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -13,13 +13,35 @@ use IdPAccountManager::Data::ServiceProvider;
 use IdPAccountManager::Logger;
 use IdPAccountManager::SAMLMetadata;
 
+## Defining parameters format
+my $urn_or_url_regex = '(http(s?):\/\/|urn:)[^\\\$\*\"\'\`\^\|\<\>\n\s]+'
+  ;    ## Format de type URL HTTP ou URN
+my $url_regex     = 'http(s?):\/\/[^\\\$\*\"\'\`\^\|\<\>\n\s]+';
+my $email_regex   = '([\w\-\_\.\/\+\=\'\&]+|\".*\")\@[\w\-]+(\.[\w\-]+)+';
+my $domains_regex = '[\w\.\-]+(,[\w\.\-]+)*';
+my %format        = (
+    ## URL
+    #'attributeauthority' => $url_regex,
+    'sp_entityid' => $urn_or_url_regex,
+);
+
+my $configuration = IdPAccountManager::Configuration->new(
+    file => 'conf/IdPAccountManager.conf'
+);
+
+my %actions = (
+    select_sp      => 'req_select_sp',
+    account_wizard => 'req_account_wizard',
+    generate_token => 'req_generate_token',
+    validate_token => 'req_validation_token',
+    home           => 'req_home',
+);
+
 ## New web request
 sub new {
     my ($pkg, %args) = @_;
 
     my $self = {
-        format        => $args{format},
-        actions       => $args{actions},
         configuration => $args{configuration},
     };
 
@@ -59,7 +81,7 @@ sub execute {
     $self->{param_out} = {
         url_cgi => $ENV{SCRIPT_NAME},
         env     => \%ENV,
-        actions => $self->{actions},
+        actions => \%actions,
         conf    => $self->{configuration},
     };
 
@@ -74,9 +96,9 @@ sub execute {
         $parameters{$parameter} =~ s/^\s+//; # remove leading spaces
 
         # format check
-        if (defined $self->{format}->{$parameter}
-            && !ref($self->{format}->{$parameter})) {
-            if ($parameters{$parameter} !~ /^$self->format->{$parameter}$/) {
+        if (defined $format{$parameter}
+            && !ref($format{$parameter})) {
+            if ($parameters{$parameter} !~ /^$format{$parameter}$/) {
                 push @{ $self->{param_out}->{errors} }, "format_$parameter";
                 $self->{logger}->log(
                     level   => LOG_ERROR,
@@ -103,11 +125,9 @@ sub execute {
     # Check the requested action
     my $action = $parameters{action} || 'home';
 
-    if ($self->{actions}->{$action}) {
-        ## Execute the target subroutine named req_actionName
-        no strict 'refs';
-        my $sub = 'req_' . $action;
-        $status = &{$sub}($self);
+    if ($actions{$action}) {
+        my $method = $actions{$action};
+        $status = $self->$method();
     } else {
         ## inknown action
         push @{ $self->{param_out}->{errors} }, "unknown_action";