added reference to filename in listing_form, cleaned up code