Which Nikon model is a step up from a Nikon D40?

Sorry, I'm not too knowledgeable when it comes to cameras. I have a Nikon D40 at the moment but I want to upgrade very soon (something not over the top expensive but still delivers excellent performance and image quality). I'm trying to get into some amateur photography. Any suggestions? Thanks for all answers!
Added (1). I like fashion/wedding photography and I know the D40 is good but I want something with clearer images.

Actually the D40 has some features that newer cameras do not have. Mainly the ability to flash sync at shutter speeds faster than 1/250th second. Sports and action photographers love this camera.
The replacement camera for the D40 is the Nikon D3100

First, what do you want to do photographically that you can't do with your D40? If the only lens you have is the one that came with the camera you might want to consider investing in a new lens or two. Perhaps the Nikon AF-S 50mm f1.8 if you'd like to shoot portraits or shoot in low-light situations without flash or maybe the Nikon 70-200mm zoom if you're interested in sport or wildlife photography.
Of course if you'd like to shoot video you'll have to upgrade to either the Nikon D3100 or D5100.

Step up(s) from the Nikon D40?
Models with "*" are current and available:
Novice or midrange cameras, in order of release (most are discontinued)
D40x
D60
D3000
D3100*
D5000
D5100*
Midrange to prosumer cameras, also some discontinued.
D50
D70
D70s
D80
D90
D7000*
The best bang for the buck currently would be the D3100 or the D90. But, if you only have the 18-55mm kit lens that came with your D40, then you're overlooking the second biggest factor in photo quality - the lens. Get a 35mm f/1.8 af-s or a 50mm f/1.8 G lens for low-light or excellent portraits. Look at the 55-200mm VR, 55-300mm VR, or 70-300mm VR for a longer reach.
There are amazing photos that can and have been taken with a D40. Change the lenses or train the photographer and you can create them as well.
I wouldn't upgrade cameras unless you've outshot and outgrown your D40.
Here's over 66 million D40 images. Look at what your camera can do.

"I want something with clearer images"
That is mostly determined by your lenses, and lighting to a lesser extent. Your money would be much better spent on better lenses, especially if you still use the 18-55mm kit lens.
Changing just the body would only mean you spent a lot of money for the not-clear images to be in higher resolution, and therefore even less clear. However, if you do find your current 6MP to be restrictive, both the D3100 and D5100 offer larger image sizes.