M.H.
Ok this is what I hear . . .
You were raised in an abusive home and married an abusive jerk. Divorced the abusive jerk only to hook up with another abusive jerk which caused you to loose your kids. You lost your job and became homeless.
Since then you have gotten your life together and taken some parenting classes. You want your children out of an abusive household and with you. The kids are so immersed in the abusive lifestyle at this point that they cannot voluntarily get out. The courts will not assist in removing them.
My suggestion? Get some counseling to help heal old wounds. Let go of your self pain for what you did or didn't do. Do your best and F@%$ the rest. You can help your 9 yr old. You can be there for your other children if and when they want to leave.
Good Luck!