(These are all behaviors he had before I took him)
The habbits he has is staying in his cage and
not wanting to leave his cage -- It sounds like you are already starting to deal with this. I definitely agree with taking him into a different room once he is out of the cage. Some birds expecially in new situations but also those accustomed to their cage may need a bit of bribing to come out. If he doesn't like a particular treat keep trying but also scratches and praise work well as a reward. Try to wait to give scratches until already out of the cage and when training this way he will learn he gets more attention when out.
not staying where he was placed (t stand) (chair) -- again it sounds like you are working well with this. Start with small intervals, gradually lengthening the time until he is staying there indefinitely. Praise and reward. Do not just leave the room once he is on the stand talk to him and praise him. If possible when working with this problem close the door to the room you are working in. Praise and scratch every few minutes when he is on the stand. When he flies off try ignoring him or without scratches or praise pick him up, do not speak to him place him back on the stand, then when he has been there again for a few minutes praise and give rubs. Sometimes picking them up can defeat the purpose if you give them too much attention while doing it because they learn if I fly off I get picked up.
wanting to run around and do what he wants whe ever he is out.(he does have play time and runs all over the house when i give it to him) -- If this is allowed at certain times and not at others it is going to be hard for him to learn just when he can do this. I would suggest instead teaching him he can explore when with you (on a perch, on your hand, on your lap etc) and having his t-stand or a large play area (playgym, climbing ropes bungee etc) for when he is allowed free playtime.
masterbating on people ( he hasnt done that since he has been with me) Many birds will try this during breeding season especially if they have one bonded person. The only way to help change this is to immediately place him down when this behavior starts. Do not give the behavior any real attention no laughing or groaning etc LOL whether he is doing this to you or someone else at the time. Just immediately place him down on the floor, do not even take the time to carry him to the cage, stand etc just down where you are standing or sitting onto the floor. When he has stopped you can pick him back up. He may still decide to do this on certain toys which is harder to break.
He wes never trained basic appropriate behavior which is why i associate him to a spoiled brat becasue he has always been use to doing what he wants with no expectations. I know its going to take longer because he is older but I cant have him acting like that either. he has been here a lil while now and he is acting almost like he was when he was at the other house so I dont think him being rehomed is a big part of the problem. -- In some ways this is like a spoiled child because a spoiled child learns this behavior from its parents (they give a treat when the child crys, buy a toy when the child has a tantrum to quiet them etc.) (the same way as if the bird flies off the t-stand and you pick him up and cuddle him, and talk to him before placing him back on the stand or into the cage he has gotten attention which was probably the reason behind the behavior in the first place.) and will keep the behavior until taught that other behaviors get rewards and the bad behavior gets no rewards. It will take patience and work and yes it is harder the longer the behavior has been allowed to go on. Also birds in new situations can be nervous which can lead to cage dependency or aggression. If this did happen in the old house it could still have been nervousness or fear. Maybe there was something in the house he was afraid of so the cage was safe. Fear or nervousness can be caused by many things from a reflective picture on the wall, a balloon, a large flower the bird is not used to, to almost anythng but by rewarding the times out the bird should eventually learn that what it is nervous of will not hurt it and that it will get a reward soon.