Updated script and templates