Implemented retry.wrap for #6, also added tests and documentaion