main_js move out of heredoc