Add possibility to forcefully add {host} condition to same-domain redirects
Move business logic to a class and split up and document methods