What did you do to get rid of your accent?
There's no real trick to it other than paying attention. Record yourself speaking, listen closely to how the sounds you use differ from the accent you want to have. Then practice saying those sounds over and over until they become natural. Keep at this for several years.
It's painful to do (though I find it less so if you focus mostly on specific sounds rather than listening to your full speech -- it's easier to separate the sound from the revulsion of hearing your own voice that way) but it works.