If you want a firmer texture, you can add about three tablespoons of flour to the tofu mixture. This should give your casserole a more solid structure.