ticket:3. Fixed according to comments
Merge branch 't3_middleware'
ticket:4 Added view and template