Feature/fix redirection

Redirection atm is quite broken :( 

Trying to make it more generic and act as expected