second compile(empty and full template) + Fix script organization