Refactored REST server in three files.
Imaplemented Redirect Function