ticket:1. Modified according to comments
Merge branch 'master' into t3_middleware
ticket:3. Tests created