This is a rebase of submit-py-20-7 (I will now delete that branch). Current changes on this branch implement two points discussed in !16 (merged)
submit-py-20-7