optimize UV map

Hello, so what was the hotkey to “recalculate” uvs to optimize space automatically?

also, is there a way to merge UV points so that if i want two UV islands to stay on top of eachother then i can just merge IV verteses together.

Pack Islands tool - Ctrl-P
https://www.blender.org/manual/editors/uv_image/uv_editing/layout_editing.html

but is there a way to merge UVs so that when you CTRL+P they will stay connected?

I do not know exactly what you mean.

Maybe this?