Companion planting is very important you can use other plants to keep bugs away...Here are a few of my favorites.
Mint: is a companion to cabbage and tomatoes and keeps white cabbage moths away.
Rue: companion to roses and raspberries keeps Japanese beetles away. It doesn't like to be near sweet basil
Wormwood: You can plant this as a border to keep small animals aways. Rabbits, mice etc..
Sage: Plant with rosemary, cabbage, and carrots. This does not like to be planted near cucumbers. It will keep carrot fly and the cabbage moth away.
Petunia: Companion to all beans.
Marigolds: Companion to tomatoes.. keeps tomato worm , and asparagus beetles away.