Added comments, clean-up, made request testable.