Copies and executes
Fixed various syntax errors