tidied up ships/views.py