ticket:13 ajax,tests,templates fixes
ticket:13 pep8 fixes