Made the script self-contained