Remade method GetPages
Added URL validation
Fixed code in in accordance with "code_conventions"