ticket:3 done. Code refactor - apply pep8 standard. Also cortrected test to check first 10 request from db. Commit to t3_middleware_local brach.