There is not way to make the cake come out flat, really. Here is what all bakers do. Get a cake cutter (wire) and cut it off by sawing back and forth acrossed the top (after removing it from the pan). Cake cutters are adjustable. This will give you a great flat top. If you don't use a wire, a large serrated bred knife will do, but you must make a level cut.
I always overfill my cake pans with batter, so they will exceed the top of the pan, then I cut with the cake cutter. This way I will always have a full layer. Also, with the cake cutter wire you can cut the cake in the middle and have two perfectly layers the same size. Most bakers make two good layers and then cut them in half and have a 4 layer cake...or as many layers they want depending on how many layers they bake.