i have three betas and none of them are in a tank.
two of them are in a tall glass jar, one is in a wine glass.
but i clean and change the water everyday.
you might have let the tank/ or w/e get really dirty.
Beta's dont need to be in a 20 gallon tank.
they live really well in just a bit of warm filtered water.
they are sollitary and the males are territorial.
like above, get a divider.
Or you can put them in anything from a glass vase to a jar.
i have one in a wine glass.