Tidy up new() function in view/applications.py