I'm not sure what you mean about erasing since I didn't include that in my explanation. But I will try to give you hints about erasing smoothly.
1. Use a hard-edge brush, not a soft-edge brush.
2. If you are working on a square or rectangle, it is helpful to use a hard-edged SQUARE brush.
3. To erase in a straight line, click once at the beginning of the line you want to erase, then SHIFT click at the end of the line. Everything in between will erase cleanly.
Hope this helps.