Improve URL composition.
Use window instead of frame to act as intermediary data.
Several improvements