Welcome to YT and Thank you for loving him!!
I would still keep him confined in one area, when you are gone or can't watch him...throw a potty party

when he does pee and poop outside you can even give him a treat "something he really likes" when he does...if you catch him in the act...say NO in a firm voice don't yell no it will scare him cause he was abused poor baby...and take him right outside and give him a command like "go potty" everytime if he doesn't potty after about 20 minutes take him back in and put him in his confined space for another 30 minutes or so and than try again until he goes...Marking is really hard to break I hear but it can be done...you might think about getting a belly band...its a diaper like thingy that you wrap around his belly over his peepee when you let him out in the house to play...if he marks than the belly band diaper catches the pee