Finishing main script