fix relative url_for bug; remove render_layout, use local variable instead