Cleans up the code

Drops the functions for redirecting because they were causing some
problems that we dont know how to solve yet