Move script from head to body to avoid wrapping in onload