Move script to a separate file