Main script wrapper