Minor changes, made everything global