Tidying up of code, still can't get dropdown to display when needed