Added API docs, fixed code to handle URLRedirect