Added render.generate plugin
Use window.location if exists
Misc updates