ticket:5 edit view issues fixed (saving the form) and optimized.PEP8 applied to middleware code written before.