How to avoid riding on a gravel on the road sides? + Riding through traffic lights
Depending on your local regulations, claiming the lane might be illegal (it is here where I live, for example). So, my advice would it be to ride on the right side of the road (assuming that right is the driving side), but not getting too close to the curb because of the debris, gravel, car doors etc. When you see (and hear) someone behind you wanting to overtake you, just move some to the right (and optionally give him a sign with your hand).

However, don't go to the right if you see that they can't overtake you safely, i.e. if the road is too narrow there, or if you see a car coming from the other direction.

On the traffic light, claim the lane! That will prevent drivers cutting you from behind, while it doesn't bother no one (you occupy less space than a car, and they are not waiting for you, but for the light anyways). When the light opens, and you pass the intersection, return to the right part of the lane.