Add exception handling.
Add redirect mechanism.