Code refactoring + requests usage