My script is very long, how can I break it in sections

You can use functions, to clear main action bar. See Functions article.