Moldings
Once you have painted the main areas of the room you will want to finish the job by painting the moldings. When painting with a brush you should make the longest strokes that you can that way the work looks uniform. Don’t Dabble at the paint.
You should be able to use one long stroke to cover the top molding around the door or windows and then paint the side moldings and while they are still wet go back with one long stroke from the bottom to the top of the door.
It is also important to use a soft bristle brush to apply the final coat on moldings because this will reduce brush strokes.
Stain not paint
If you have stain grade moldings which is another factor you should really remove these moldings to refinish them. Applying a good Polyurethane or shellac finish on wood is difficult under the best conditions but if you are fighting with carpet fibers and dust your work is going to end up looking worse then if you just left them alone.