Well, the gold book with the "@" is a shortcut to your address book. It, like anything else you don't want on your dock, can simply be dragged off the dock with your mouse. When you let go of the mouse button, it will disappear in a puff of smoke. Gone!
Now, about this applications shortcut, is it to the right or left of the dock's dividing line? If it isn't working as you expect, simply drag it off also. It's easy to make it right.
To make a correct applications shortcut, simply open a Finder window and navigate to the applications, so that you can see the list of them. Now, you will see that at the very top and center of your Finder window there will be a small icon that looks like the applications folder. What you want to do is grab that small icon with your mouse and drag it to the dock in the area to the right of the dividing line. And that should do it.
It's very likely someone will post an easier way to do this, but this is the way I know, and I guarantee it will work.
edit: Oh, I see now that your problem is just that you changed your folder into a stack. To fix it, just control-click it and select "Display as Folder."