putting solids from disposable nappies down the toilet and then double bagging (consider using real nappies)

leaving cat or dog food out only briefly

squeezing air out of bags before placing them in your bin as a lack of air slows down the decomposing process and reduces smells

If you do get maggots, once the bin has been emptied, pour boiling water over flies and maggots to kill them and leave water in the bin to cool before tipping it out. Clean the bin out with disinfectant or bleach as this will help to deter flies in the future.