Added initial full version of script.