removed code unrelated to the rest api and moving request's code to request's module