Refactor the script task to conform to current coding style

r? @metajack