Merging some scripts from the forums , first pass

As Dicussed